﻿@model IEnumerable<iDMS.Models.Department>
           @using MvcHtmlHelpers

<script type="text/javascript">
    $(function () {
        $("a.action").button();
    });

    
</script>

<table>
    <tr>
        <th>
        </th>
        <th>
            Full Name
        </th>
        <th>
            Short Name
        </th>
        <th>
            Supervisor
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.ActionLink("Details", "Department", new { id = item.DepartmentID }, new { @class = "action" })
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FullName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ShortName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Employee.FullName)
                @Html.EmployeeDetailsActionLink(item.Employee)
            </td>
        </tr>
    }
</table>